Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to Input and CheckBox when updating styles #101

Merged

Conversation

drpepper
Copy link

@drpepper drpepper commented Oct 2, 2023

Hello,

As part of a project I'm working on, I ran into two issues with PixiUI that I was able to resolve. I hope this can help others as well.

  1. In my project, the Input fields can lose focus when in the "mobile simulator mode" of Chrome. This doesn't happen in the Storybook demo, I'm not sure why. I fixed it by adding a handler to the "blur" event on the input field.
  2. Changing the background (setting the bg attribute) of an Input or CheckBox lead to strange results. For Input boxes, I was unable to interact with them, and white boxes appeared behind them. My checkbox sprites simply disappeared. I fixed this for the Input box by removing the old background and input mask before adding them back in, in the correct place. For the checkbox, I had to remove the active attribute so that the setter worked correctly.
  3. I also added in preventDefault() to the keyboard input events, which should hopefully correct Text input may need to prevent default/bubble #45

Love the work you're doing, keep it up!

@CyberDex CyberDex changed the base branch from main to 110-checkbox-when-update-styles-it-is-broken October 20, 2023 20:53
Copy link
Member

@CyberDex CyberDex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @drpepper!!!

@CyberDex CyberDex merged commit 9dcf683 into pixijs:110-checkbox-when-update-styles-it-is-broken Oct 20, 2023
1 check passed
CyberDex added a commit that referenced this pull request Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants